package com.itfenghuang.day04;

public class A01_day3练习 {
    public static void main(String[] args) {

//        int[] arr={1,2,3,4,5};
//        String s=toString(arr);
//        System.out.println(s);

        int a=1;
        int b=2;
        String s="1";
        int c=a+b;
        //字符串和任何数相加都是拼接
        String s1=s+a;
        System.out.println(c);
        System.out.println(s1);
    }
    public  static String toString(int[] arr){
        if (null==arr){
            return "null";
        }else if (arr.length==0){
            return "[]";
        }else{
            //遍历数组
            String str="";
            for (int i = 0; i <arr.length ; i++) {
                int result=arr[i];
                String s=str + result;
            }
            return str;
        }


    }






}
